package group2;

import java.lang.reflect.Array;
import java.util.Arrays;
public class ArraysTest {
    public static void main(String[] args) {
        //   排序测试
        sortTest();
        //部分排序测试
        partSortTest();
        Array array;
        Arrays arrays;
    }

    private static void sortTest() {
        int[] nums = {2, 5, 0, 4, 6, -10};
        Arrays.sort(nums);
        for (int i : nums)
            System.out.print(i + " ");
        System.out.println();
    }

    private static void partSortTest() {
        int[] nums = {2, 5, 0, 4, 1, -10};
        //对前四位元素进行排序
        Arrays.sort(nums, 0, 4);
        for (int i : nums)
            System.out.print(i + " ");
        System.out.println();
    }
}
